
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>员工列表</title>
</head>
<h1>员工列表</h1>
		<?php
		require_once 'EmpService.class.php';
		require_once 'Paging.class.php';
		
		$paging = new Paging();
		
		if (! empty ( $_GET ['pageNow'] )) {
			$paging->pageNow = $_GET ['pageNow'];
		}
		
		$empService = new EmpService ();
		
		$empService->getPaging($paging);
		
		echo "<table border=\"1px\">";
		echo "	<tr>";
		echo "		<td>id</td>";
		echo "		<td>姓名</td>";
		echo "		<td>等级</td>";
		echo "		<td>Email</td>";
		echo "		<td>薪水</td>";
		echo "		<td>操作</td>";
		echo "	</tr>";
		$result = $paging->res_array;
		for($i = 0; $i < count ( $result ); $i ++) {
			$row = $result [$i];
			echo "<tr>";
			echo "<td>" . $row ['id'] . "</td>";
			echo "<td>" . $row ['name'] . "</td>";
			echo "<td>" . $row ['grade'] . "</td>";
			echo "<td>" . $row ['email'] . "</td>";
			echo "<td>" . $row ['salary'] . "</td>";
			echo "<td><a href='#'>修改</a>&nbsp;&nbsp;<a href='#'>删除</a></td>";
			echo "</tr>";
		}
		echo "	</table>";
		
		echo $paging->navigation;
		?>
<form action="empList.php">
	跳转到<input name="pageNow" type="text"> <input type="submit" value="转到" />
</form>
</html>




